package net.starwifi.duobao.service.impl;




import net.starwifi.duobao.entity.Area;
import net.starwifi.duobao.service.AreaService;
import net.starwifi.duobao.service.BaseServiceImpl;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Service - 地区
 *
 * @author ruoo
 * @version 1.0
 */
@Service
public class AreaServiceImpl extends BaseServiceImpl<Area, Long> implements AreaService {




	@Override
	@Transactional(readOnly = true)
	@Cacheable(value = "area")
	public List<Area> getCacheListData(String whereJPQL, Object[] queryParams) {
		return getListData(whereJPQL,queryParams);
	}

	@Override
	@Transactional
	@CacheEvict(value = "area", allEntries = true)
	public void save(Area area) {
		super.save(area);
	}

	@Override
	@Transactional
	@CacheEvict(value = "area", allEntries = true)
	public Area update(Area area) {
		return super.update(area);
	}

	@Override
	@Transactional
	@CacheEvict(value = "area", allEntries = true)
	public Area update(Area area, String... ignoreProperties) {
		return super.update(area, ignoreProperties);
	}

	@Override
	@Transactional
	@CacheEvict(value = "area", allEntries = true)
	public void delete(Long id) {
		super.delete(id);
	}

	@Override
	@Transactional
	@CacheEvict(value = "area", allEntries = true)
	public void delete(Long... ids) {
		super.delete(ids);
	}

	@Override
	@Transactional
	@CacheEvict(value = "area", allEntries = true)
	public void delete(Area area) {
		super.delete(area);
	}

}